/// 函数 
fn main(){
    println!("函数学习");
    other_function();
    while_();
    for_();
}
// 其他函数
fn other_function(){
    println!("其他函数调用")
}
fn while_(){
    let mut i = 1;
    while i < 10 {
        i +=1;
    }
    println!("{}",i)
}
fn for_(){
    let a = [1,2,3,4,5,6];
    for i in a.iter() {
        println!("for循环遍历1_{}",i)
    }
    for i in 0..a.len() {
        println!("for循环遍历2_{}",a[i])
    }
}